package one.stand.mapper;

import one.stand.model.CompanyCustomerLable;
import one.stand.response.CompanyCustomerLableResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Administrator
 */
public interface CompanyCustomerLableMapperExt extends CompanyCustomerLableMapper {
    int deleteByPrimaryKey(@Param("lableId") Integer lableId, @Param("parentId") Integer parentId);

    /**
     * 获取公司标签树
     */
    List<CompanyCustomerLableResponse> getTree(@Param("parentId") Integer parentId, @Param("companyId") Integer companyId);

    /**
     * 获取每个客户的标签
     */
    List<CompanyCustomerLable> getLabels(@Param("type") Integer type, @Param("typeId") Integer typeId);

    /**
     * 根据id获取标签名
     *
     * @param lableIds
     * @return
     */
    List<CompanyCustomerLable> selectLibles(@Param("lableIds") Integer[] lableIds);

    CompanyCustomerLable selectLabel(@Param("labelName") String labelName);

    Integer selectTypeIdCount(@Param("labelId") Integer labelId, @Param("type") Integer type);

    List<Integer> selectTypeId(@Param("labelIds") String labelIds, @Param("type") Integer type);

}